﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<FacialClub.Models.ViewModels.NewsEventViewModel>" %>
<%@ Import Namespace="FacialClub.Helpers" %>
<%@ Import Namespace="FacialClub.Helpers.Widgets" %>
<%: Html.ValidationSummaryJQuery("Please fix these errors.", new Dictionary<string, object> { { "id", "valSumId" } })%>
<% Html.EnableClientValidation(); %>
<% using (Html.BeginForm()) {%>
<% ViewContext.FormContext.ValidationSummaryId = "valSumId"; %>
        <table width="100%" border="0" cellspacing="0" cellpadding="5">
            <tr>
                <td style="width:80px;" >
                    <strong><%: Html.LabelFor(model => model.NewsEvent.Title) %></strong></td>
                <td style="width:10px;">
                    &nbsp;</td>
                <td>
                    <%: Html.TextBoxFor(model => model.NewsEvent.Title) %>
                <%: Html.ValidationMessageFor(model => model.NewsEvent.Title,"*") %>
                </td>
            </tr>
            <tr>
                <td>
                  <strong><%: Html.LabelFor(model => model.NewsEvent.Description) %></strong></td>
                <td>
                    &nbsp;</td>
                <td >
                     &nbsp;
                </td>
            </tr>
            <tr>
                <td colspan="3"><%= Html.EditorFor(model => model.NewsEvent.Description) %>
                <%: Html.ValidationMessageFor(model => model.NewsEvent.Description,"*") %></td>
            </tr>
            <tr>
                <td>
                  <strong><%: Html.LabelFor(model => model.NewsEvent.PostedDate) %></strong></td>
                <td >
                    &nbsp;</td>
                <td>
                <%= Html.Datepicker("PostedDate", DateTime.Now.ToShortDateString())%>
                    <%: Html.TextBoxFor(model => model.NewsEvent.PostedDate, new { style = "width:120px" })%>
                    <%: Html.ValidationMessageFor(model => model.NewsEvent.PostedDate, "*")%></td>
            </tr>
            <tr>
                <td>
                    <strong><%: Html.LabelFor(model => model.NewsEvent.IsActive) %></strong></td>
                <td>
                    &nbsp;</td>
                <td>
                     <%= Html.RadioButton("IsActive", true, true)%> Yes <%= Html.RadioButton("IsActive", false, false)%> No <br />
            <%: Html.ValidationMessage("IsActive", "*")%></td>
            </tr>
            <tr>
                <td>
                    <input type="submit" value="Submit" /></td>
                <td>
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
            </tr>
    </table>
<% } %>
